@extends('Index/base')
@section('content')
	<!-- 搜索栏 -->
	<div class="top-search">
		<div class="inner">
			<a class="logo" href="/"><img src="/index/images/icons/logo.jpg" alt="U袋网" class="cover"></a>
			<div class="search-box">
				<form class="input-group" method='get' action='/index/webpage/item_category'>
					<input placeholder="Ta们都在搜U袋网" type="text" name="keywords">
					<span class="input-group-btn">
						<button type="submit">
							<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
						</button>
					</span>
				</form>
				<p class="help-block text-nowrap">
					<a href="/index/webpage/item_category?keywords=连衣裙">连衣裙</a>
					<a href="/index/webpage/item_category?keywords=裤">裤</a>
					<a href="/index/webpage/item_category?keywords=衬衫">衬衫</a>
					<a href="/index/webpage/item_category?keywords=T恤">T恤</a>
					<a href="/index/webpage/item_category?keywords=女包">女包</a>
					<a href="/index/webpage/item_category?keywords=家居服">家居服</a>
				</p>
			</div>
			<div class="cart-box">
				<a href="/index/shopcart/udai_shopcart" class="cart-but">
					<i class="iconfont icon-shopcart cr fz16"></i> 购物车 {{$shopcart_count}} 件
				</a>
			</div>
		</div>
	</div>
	
	<!-- 首页导航栏 -->
	<div class="top-nav bg3">
		<div class="nav-box inner">
			<div class="all-cat">
				<div class="title"><i class="iconfont icon-menu"></i> 全部分类</div>
				<div class="cat-list__box">
				@foreach($arr1 as $list1)
					<div class="cat-box">
						<div class="title">
							<i class="iconfont icon-skirt ce"></i> 
							<a href="/index/webpage/item_category?keywords={{$list1->classify}}" style="color:#fff; text-decoration:none;">{{$list1->classify}}</a>
						</div>
						<ul class="cat-list clearfix">
						@foreach($arr2 as $list2)
							@if($list2->pid==$list1->id)
							<li>
								<a href="/index/webpage/item_category?keywords={{$list1->classify}} {{$list2->classify}}" style="color:#999; text-decoration:none;">{{$list2->classify}}</a>
							</li>
							@endif
						@endforeach
						</ul>
						<div class="cat-list__deploy">
							<div class="deploy-box">
							@foreach($arr2 as $list2)
								@if($list2->pid==$list1->id)
								<div class="genre-box clearfix">
									<span class="title">{{$list2->classify}}：</span>
									<div class="genre-list">
									@foreach($arr3 as $list3)
										@if($list3->pid==$list2->id)
										<a href="/index/webpage/item_category?keywords={{$list1->classify}} {{$list2->classify}} {{$list3->classify}}">{{$list3->classify}}</a>
										@endif
									@endforeach
									</div>
								</div>
								@endif
							@endforeach
							</div>
						</div>
					</div>
				@endforeach
				</div>				
			</div>
			<ul class="nva-list">
				<a href="/"><li class="active">首页</li></a>
				<ul class="nva-list">
				@foreach($arr1 as $list1)
				<a href="javascript:;" class="scroll-nav" style="display:inline;"><li>{{$list1->classify}}</li></a>
				@endforeach
				</ul>
			</ul>
		</div>
	</div>
	<!-- 顶部轮播 -->
    <div class="swiper-container banner-box">
        <div class="swiper-wrapper">
    	@foreach ($banner as $v)
            <div class="swiper-slide"><a href="javascript:;"><img src="/admin/images/banner/{{$v->img}}" class="cover"></a></div>
        @endforeach
        </div>
        <div class="swiper-pagination"></div>
    </div>
    <!-- 首页楼层导航 -->
	<!-- <nav class="floor-nav visible-lg-block">
	@foreach($arr1 as $list)
		<span class="scroll-nav">{{$list->classify}}</span>
	@endforeach
	</nav> -->
	<!-- 楼层内容 -->
	<div class="content inner" style="margin-bottom: 40px;">
	@foreach($arr1 as $i=>$list1)
		<section class="scroll-floor floor-{{$loop->iteration}}">
			<div class="floor-title">
				<i class="iconfont icon-skirt fz16"></i> {{$list1->classify}}
				<div class="case-list fz0 pull-right">
				@foreach($arr2 as $list2)
					@if($list2->pid==$list1->id)
					<a href="/index/webpage/item_category?keywords={{$list1->classify}} {{$list2->classify}}">{{$list2->classify}}</a>
					@endif
				@endforeach
				</div>
			</div>
			<div class="con-box">
				<a class="left-img hot-img" href="/index/webpage/item_category?keywords={{$list1->classify}}">
					<img src="/index/images/floor_{{$loop->iteration}}.jpg" alt="" class="cover">
				</a>
				<div class="right-box">
				@foreach($garr[$i] as $glist)
					<a href="/index/webpage/item_show?id={{$glist->id}}" class="floor-item">
						<div class="item-img hot-img">
							<img src="upload/{{$glist->img}}" alt="{{$glist->name}}" class="cover">
						</div>
						<div class="price clearfix">
							<span class="pull-left cr fz16">￥{{$glist->price}}</span>
							<span class="pull-right c6">进货价</span>
						</div>
						<div class="name ep" title="{{$glist->name}}">{{$glist->name}}</div>
					</a>
				@endforeach
				</div>
			</div>
		</section>
	@endforeach
	</div>
	<script>
		$(document).ready(function(){ 
			// 顶部banner轮播
			var banner_swiper = new Swiper('.banner-box', {
				autoplayDisableOnInteraction : false,
				pagination: '.banner-box .swiper-pagination',
				paginationClickable: true,
				autoplay : 5000,
			});
			// 新闻列表滚动
			var notice_swiper = new Swiper('.notice-box .swiper-container', {
				paginationClickable: true,
				mousewheelControl : true,
				direction : 'vertical',
				slidesPerView : 10,
				autoplay : 2e3,
			});
			// 楼层导航自动 active
			$.scrollFloor();
			// 页面下拉固定楼层导航
			$('.floor-nav').smartFloat();
			$('.to-top').toTop({position:false});
		});
	</script>
@endsection
